<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 4/17/17
 * Time: 1:49 PM
 */

namespace common\models;
use common\models\SpecialCard;

/**
 * Class DividedPaymentsOrder
 * @package common\models
 *
 * @property DividedPaymentsOrderLog[] $dividedPaymentsOrderLogs
 * @property Custom $custom
 * @property Car $car
 */
class DividedPaymentsOrder extends \common\models\base\DividedPaymentsOrder
{
	const STATUS_DEFAULT = 10;
	const STATUS_HAS_SEND = 11;
	const STATUS_HAS_GAIN = 12;
	const STATUS_HAS_UPDATE = 13;
	
	/**
	 * @return \yii\db\ActiveQuery
	 */
	public function getCar()
	{
		return $this->hasOne(Car::className(), ['id'=>'car_id']);
	}
	
	/**
	 * @return \yii\db\ActiveQuery
	 */
	public function getCustom()
	{
		return $this->hasOne(Custom::className(), ['id' => 'custom_id']);
	}
	
	/**
	 * @return \yii\db\ActiveQuery
	 */
	public function getDividedPaymentsOrderLogs()
	{
		return $this->hasMany(DividedPaymentsOrderLog::className(), ['divi_order_id' => 'id']);
	}
}